import Axios from "./axios"  // 导入配置好的axios文件
// 封装axios请求函数，并用export导出
export function login(datas) {
  return Axios({
    url: "/login",
    method: "post",
    headers: {
      'Content-Type': 'application/json' //设置请求头请求格式form
    },
    dataType: "json"
    ,
    data : datas
  })
}


export function uploadCode(data) {
  return Axios({
    url: "/codeFunction/upload",
    method: "post",
    headers: {
      'Content-Type': 'application/json'//设置请求头请求格式form
    },
   data: data
  })
}
export function register(datas) {
  return Axios({
    url: "/register",
    method: "post",
    headers: {
      'Content-Type': 'application/json' //设置请求头请求格式为json
    },
    data: datas
  })
}
export function getCodeList(datas) {
  return Axios({
    url: "/codeFunction/getCodeList",
    method: "post",
    headers: {
      'Content-Type': 'application/json' //设置请求头请求格式为json
    },
    data: datas
  })
}
export function getCodeByLimte(datas) {
  return Axios({
    url: "/codeFunction/getCodeByLimte",
    method: "post",
    headers: {
      'Content-Type': 'application/json' //设置请求头请求格式为json
    },
    data: datas
  })
}
